<template>
 <div>
<!--  -->
<h1 ref='hh' id="h1">你好,世界!</h1>
<button @click="get">点我获取h1</button>
 </div>
</template>
<script>
export default {
 data() {
 return {
 }
 },
 methods:{
  get(){
    const h1=document.querySelector('h1')
    console.log(h1);
    console.log(this.$refs.hh);
  }
 },
}
</script>

